package com.feihao.zhou.demo01_Thread;

public class Demo01Thread {
    public static void main(String[] args) {

        //创建线程对象1：
        MyThread myThread1 = new MyThread();
        //启动线程
        myThread1.start();

        //创建线程对象2：
        MyThread myThread2 = new MyThread();
        myThread2.start();

        //主线程的执行方法：
        print();

        System.out.println(Thread.currentThread());


    }

    private static void print() {
        for (int i = 0; i < 100; i++) {
            System.out.println(Thread.currentThread().getName()+"主" + i);
        }
    }


}
